﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ACPanel/AdminPage.master" AutoEventWireup="true"
    CodeFile="AddEditTour.aspx.cs" Inherits="ACPanel_NodeTour_AddEditTour" %>

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="<%= Page.ResolveClientUrl("~/css/jquery.tagsinput.css") %>" rel="stylesheet"
        type="text/css" />
    <link href="../../css/bootstrap-datetimepicker.css" rel="stylesheet" type="text/css" />
    <link href="../../css/site.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= Page.ResolveClientUrl("~/js/jquery.tagsinput.js") %>"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <div class="row">
                <div class="col-md-12">
                    <h1>
                        Thêm mới / Chỉnh sửa tour</h1>
                    <ol class="breadcrumb">
                        <li><i class="fa fa-dashboard"></i> Bảng điều khiển</li>
                        <li class="active"><i class="fa fa-table"></i> Thêm mới - Chỉnh sửa tour</li>
                        <li>
                            <asp:Literal runat="server" ID="litResult1" EnableViewState="False"></asp:Literal></li>
                    </ol>
                </div>
                <div class="col-md-8">
                    <p>
                        <asp:HyperLink ID="HyperLink1" runat="server" CssClass="btn btn-danger" NavigateUrl="~/ACPanel/NodeTour/QLTour.aspx"><i class="fa fa-backward"></i> Trở về</asp:HyperLink>
                    </p>
                    <div class="form-group">
                        <p>
                            <label>
                                Chọn Tour điểm đến</label>
                            <asp:DropDownList CssClass="form-control" runat="server" ID="ddlTourdiemden" />
                        </p>
                        <p>
                            <label>
                                Mã tour</label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbId"></asp:TextBox>
                        </p>
                        <p>
                            <label>
                                Tiêu đề tour</label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbTieude"></asp:TextBox>
                        </p>
                        <p>
                            <label>
                                Tóm tắt</label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbTomtat" TextMode="MultiLine"
                                Rows="3"></asp:TextBox>
                        </p>
                        <p>
                            <label>
                                Ảnh đại diện (Size : XXX . XXX)</label><a href="javascript:void(0)" id="show-imgAvatar">Show
                                    Image</a>
                            <asp:FileUpload CssClass="form-control" runat="server" ID="imgUploadAnhdaidien" />
                        </p>
                        <p>
                            <label>
                                Ảnh panorama (Size : XXX . XXX)</label><a href="javascript:void(0)" id="show-imgPanorama">Show
                                    Image</a>
                            <asp:FileUpload CssClass="form-control" runat="server" ID="imgUploadAnhpanorama" />
                        </p>
                        <p>
                            <label>
                                Nội dung</label>
                            <FTB:FreeTextBox ID="tbNoidung" AutoParseStyles="True" Width="100%" HtmlModeCssClass="form-control"
                                ImageGalleryPath="~/Upload" ToolbarStyleConfiguration="OfficeXP" UseToolbarBackGroundImage="True"
                                ToolbarBackgroundImage="True" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,
                            FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,
                            Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,
                            NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print|
                            SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable|InsertImageFromGallery,Preview,SelectAll"
                                runat="Server" />
                        </p>
                        <p>
                            <button type="reset" class="btn btn-default">
                                Xóa</button>
                            <asp:Button runat="server" CssClass="btn btn-primary" ID="btnThemvao" Text="Thêm vào"
                                OnClick="btnThemvao_OnClick" /></p>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="form-group">
                        <p>
                            <label>Số chỗ</label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbSocho" TextMode="SingleLine"></asp:TextBox>
                        </p>
                        <label>Ngày giờ đi</label>
                        <p class="input-group date">
                            <%--<asp:TextBox CssClass="form-control" runat="server" ID="tbNgaydi"></asp:TextBox>--%>
                            <span id="show-calNgaydi" class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
                                <asp:Calendar runat="server" ID="calendar1"></asp:Calendar>
                            </span>
                        </p>
                        <label>Ngày giờ đến</label>
                        <p class="input-group date">
                            <%--<asp:TextBox CssClass="form-control" runat="server" ID="tbNgayden"></asp:TextBox>--%>
                            <span id="show-calNgayden" class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
                            <asp:Calendar runat="server" ID="calendar2"></asp:Calendar>
                            </span>                            
                        </p>
                        <p>
                            <label>Nơi đi</label>
                            <asp:DropDownList CssClass="form-control" runat="server" ID="ddlNoidi">
                            </asp:DropDownList>
                        </p>
                        <p>
                            <label>Nơi đến</label>
                            <asp:DropDownList CssClass="form-control" runat="server" ID="ddlNoiden">
                            </asp:DropDownList>
                        </p>
                        <p>
                            <label>Giá tour</label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbGiatour"></asp:TextBox>
                        </p>
                        <p>
                            <label>Tags</label>
                            <asp:TextBox CssClass="form-control" Text="vyctravel,du lịch" runat="server" ID="tbTags"></asp:TextBox>
                        </p>
                        <p>
                            <label>Tour độc đáo</label>
                            <asp:DropDownList CssClass="form-control" runat="server" ID="ddlTourdocdao" />
                        </p>
                        <p>
                            <label>Tour lễ tết</label>
                            <asp:DropDownList CssClass="form-control" runat="server" ID="ddlTourletet" />
                        </p>
                        <p>
                            <label>Hiển thị trên Panorama lớn ?</label>
                            <asp:CheckBox CssClass="form-control" runat="server" ID="cbHienthipanoramalon" ToolTip="Hiển thị" />
                        </p>
                        <p>
                            <label>Sử dụng</label>
                            <asp:CheckBox CssClass="form-control" runat="server" ID="cbTrangThai" ToolTip="Trạng thái sử dụng" />
                        </p>
                        <p>
                            <asp:Literal runat="server" ID="litResult" EnableViewState="False"></asp:Literal>
                        </p>
                    </div>
                </div>
            </div>
            <div class="row">
                <div id="img-popupAvatar" class="modal fade in" tabindex="-1">
                    <div class="container">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="modal-header">
                                    <h3>
                                        Avatar</h3>
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                        x</button>
                                </div>
                                <div class="modal-body">
                                    <article>
                                        <asp:Image runat="server" ID="imgPopupAvatar" ImageUrl="../../Upload/Diadiem/NO_IMAGE.gif" AlternateText="NO_IMAGE.gif"/>
                                    </article>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div id="img-popupPanorama" class="modal fade in" tabindex="-1">
                    <div class="container">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="modal-header">
                                    <h3>
                                        Panorama</h3>
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                        x</button>
                                </div>
                                <div class="modal-body">
                                    <article>
                                        <asp:Image runat="server" ID="imgPopupPanorama" ImageUrl="../../Upload/Diadiem/NO_IMAGE.gif" AlternateText="NO_IMAGE.gif"/>
                                    </article>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnThemvao" />
        </Triggers>
    </asp:UpdatePanel>    
    <script type="text/javascript">
        var tagInput = null;
        window.onload = function () {
            try {
                tagInput = document.getElementById('<%= tbTags.ClientID %>');
                $(function () {
                    $('#' + '<%= tbTags.ClientID %>').tagsInput({ width: 'auto' });
                });
            } catch (e) {
                tagInput = null;
            }
        };        

        $('#show-imgAvatar').off('click').on('click', function () {
            $('#img-popupAvatar').modal();
        });
        $('#show-imgPanorama').off('click').on('click', function () {
            $('#img-popupPanorama').modal();
        });
    </script>
</asp:Content>
